export default function DaoPage() {
  return (
    <div className="min-h-screen bg-gradient-to-br from-blue-50 via-white to-green-50 py-8">
      <div className="max-w-7xl mx-auto px-6">
        <div className="bg-white rounded-lg border border-gray-200 p-8">
          <h1 className="text-2xl font-bold text-gray-900 mb-6">DAO治理</h1>
          <div className="space-y-6">
            {/* 治理统计 */}
            <div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
              <div className="bg-blue-50 rounded-lg p-4">
                <div className="flex items-center justify-between">
                  <div>
                    <p className="text-sm text-blue-600">总投票权</p>
                    <p className="text-2xl font-bold text-blue-900">1,250,000</p>
                  </div>
                  <svg className="w-8 h-8 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
                  </svg>
                </div>
              </div>
              
              <div className="bg-green-50 rounded-lg p-4">
                <div className="flex items-center justify-between">
                  <div>
                    <p className="text-sm text-green-600">活跃提案</p>
                    <p className="text-2xl font-bold text-green-900">5</p>
                  </div>
                  <svg className="w-8 h-8 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
                  </svg>
                </div>
              </div>
              
              <div className="bg-purple-50 rounded-lg p-4">
                <div className="flex items-center justify-between">
                  <div>
                    <p className="text-sm text-purple-600">参与率</p>
                    <p className="text-2xl font-bold text-purple-900">68%</p>
                  </div>
                  <svg className="w-8 h-8 text-purple-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
                  </svg>
                </div>
              </div>
            </div>

            {/* 活跃提案 */}
            <div className="bg-gray-50 rounded-lg p-6">
              <h2 className="text-lg font-semibold text-gray-900 mb-4">活跃提案</h2>
              <div className="space-y-4">
                <div className="bg-white rounded-lg p-4">
                  <div className="flex items-start justify-between mb-3">
                    <div>
                      <h3 className="font-medium text-gray-900">增加平台手续费至3%</h3>
                      <p className="text-sm text-gray-500">提案 #123 • 2024-01-15</p>
                    </div>
                    <span className="px-2 py-1 text-xs font-semibold rounded-full bg-yellow-100 text-yellow-800">
                      投票中
                    </span>
                  </div>
                  <p className="text-gray-700 text-sm mb-3">
                    提议将平台手续费从2%增加到3%，以支持平台发展和维护。
                  </p>
                  <div className="flex items-center justify-between">
                    <div className="flex space-x-4 text-sm">
                      <span className="text-green-600">赞成: 65%</span>
                      <span className="text-red-600">反对: 35%</span>
                    </div>
                    <button className="px-3 py-1 bg-blue-500 text-white rounded text-sm hover:bg-blue-600">
                      投票
                    </button>
                  </div>
                </div>
                
                <div className="bg-white rounded-lg p-4">
                  <div className="flex items-start justify-between mb-3">
                    <div>
                      <h3 className="font-medium text-gray-900">添加新的Agent分类</h3>
                      <p className="text-sm text-gray-500">提案 #124 • 2024-01-14</p>
                    </div>
                    <span className="px-2 py-1 text-xs font-semibold rounded-full bg-yellow-100 text-yellow-800">
                      投票中
                    </span>
                  </div>
                  <p className="text-gray-700 text-sm mb-3">
                    提议添加"区块链开发"和"DeFi协议"两个新的Agent分类。
                  </p>
                  <div className="flex items-center justify-between">
                    <div className="flex space-x-4 text-sm">
                      <span className="text-green-600">赞成: 78%</span>
                      <span className="text-red-600">反对: 22%</span>
                    </div>
                    <button className="px-3 py-1 bg-blue-500 text-white rounded text-sm hover:bg-blue-600">
                      投票
                    </button>
                  </div>
                </div>
              </div>
            </div>

            {/* 我的投票权 */}
            <div className="bg-gray-50 rounded-lg p-6">
              <h2 className="text-lg font-semibold text-gray-900 mb-4">我的投票权</h2>
              <div className="space-y-3">
                <div className="flex justify-between items-center">
                  <span className="text-gray-600">持有代币:</span>
                  <span className="font-medium text-gray-900">25,000 ALD</span>
                </div>
                <div className="flex justify-between items-center">
                  <span className="text-gray-600">投票权重:</span>
                  <span className="font-medium text-gray-900">2.0%</span>
                </div>
                <div className="flex justify-between items-center">
                  <span className="text-gray-600">已参与提案:</span>
                  <span className="font-medium text-gray-900">3/5</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
} 